<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<!-- 3、用数组的 filter, map, reduce 方法对以下数据做处理.
1、
/**
 * 用数组的 filter, map, reduce 方法对以下数据做处理，使得输出结果为 '278'
 * const ary = [{a: 8}, {a: 1}, {a: 7}, {a: 2}];
 *
 * @param ary
 */
const filter = (ary) => {
 
} -->

<body>
    <div>test13-3</div>
    <script>
        const ary = [{ a: 8 }, { a: 1 }, { a: 7 }, { a: 2 }];
        const filter = (ary) => {
            return ary.filter(i => i.a !== 1).map(i => i.a).reduce((total, item) => `${item}${total}`)
        }
        console.log(filter(ary))
    </script>
</body>

</html>